﻿@{
    bool isHomeIndex = ViewContext.RouteData.Values["action"]?.ToString()?.ToLower() == "index" && ViewContext.RouteData.Values["controller"]?.ToString()?.ToLower() == "home";
}
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>@ViewData["Title"]</title>
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8" />
    <link rel="icon" href="/favicon.ico" />
    <link rel="stylesheet" href="/lib/layui/css/layui.css" />
    @if (isHomeIndex)
    {
        <link rel="stylesheet" href="/lib/hyframe/hyframe.css" />
        <link rel="stylesheet" href="/lib/iconfont/iconfont.css" />
        <style>
            .layui-header .layui-icon {
                font-size: 24px;
            }

            .layui-icon {
                display: inline-block;
            }
        </style>
    }
    else
    {
        <link rel="stylesheet" href="/css/public.css" />
    }
    @await RenderSectionAsync("Styles", required: false)
    <script type="text/javascript" src="/lib/layui/layui.js"></script>
    @if (!isHomeIndex)
    {
        <script type="text/javascript" src="/js/public.js"></script>
    }
    <script>
        layui.config({
            version: true
        });
    </script>
</head>
<body>
    @if (isHomeIndex)
    {
        <div class="layui-layout layui-layout-admin">
            @RenderBody()
        </div>
    }
    else
    {
        <div class="container">
            <div class="main">
                @RenderBody()
            </div>
        </div>
    }
    @await RenderSectionAsync("Scripts", required: false)
</body>
</html>
